package com.bstek.code.model;

import java.io.Serializable;
import java.util.List;

public class Info implements Serializable {

	private static final long serialVersionUID = 1L;
	private TableInfo tab;// 表信息

	private String packageName;// 包名

	private String domainName;// packageName.javaBean

	private String javaBean;// tableName对应的javaBean

	private String controllerName;// bo类名

	private String daoName;// dao类名

	private String serviceName;// dao类名

	private String prBeanId;// beanid 前缀

	private String daoBeanId;// dao beanid

	private String controllerBeanId;// bo beanid

	private String serviceBeanId;// service beanid
	
	private List<ColumnInfo> displayCols;// 显示的列

	public Info() {

	}

	public Info(String javaBean, String packageName) {
		this.javaBean = javaBean;
		this.packageName = packageName;
		this.daoName = javaBean + "Dao";
		this.controllerName = javaBean + "Controller";
		this.serviceName = javaBean + "Service";
		this.domainName = packageName + ".entity." + javaBean;
	}

	public String getPackageName() {
		return packageName;
	}

	public void setPackageName(String packageName) {
		this.packageName = packageName;
	}

	public String getJavaBean() {
		return javaBean;
	}

	public void setJavaBean(String javaBean) {
		this.javaBean = javaBean;
	}

	public String getDaoName() {
		return daoName;
	}

	public void setDaoName(String daoName) {
		this.daoName = daoName;
	}

	public String getDomainName() {
		return domainName;
	}

	public void setDomainName(String domainName) {
		this.domainName = domainName;
	}

	public TableInfo getTab() {
		return tab;
	}

	public void setTab(TableInfo tab) {
		this.tab = tab;
	}

	public String getPrBeanId() {
		return prBeanId;
	}

	public void setPrBeanId(String prBeanId) {
		this.prBeanId = prBeanId;
	}

	public String getDaoBeanId() {
		return daoBeanId;
	}

	public void setDaoBeanId(String daoBeanId) {
		this.daoBeanId = daoBeanId;
	}

	public String getControllerName() {
		return controllerName;
	}

	public void setControllerName(String controllerName) {
		this.controllerName = controllerName;
	}

	public String getServiceName() {
		return serviceName;
	}

	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}

	public String getControllerBeanId() {
		return controllerBeanId;
	}

	public void setControllerBeanId(String controllerBeanId) {
		this.controllerBeanId = controllerBeanId;
	}

	public String getServiceBeanId() {
		return serviceBeanId;
	}

	public void setServiceBeanId(String serviceBeanId) {
		this.serviceBeanId = serviceBeanId;
	}

	
	
	/**
	 * @return the displayCols
	 */
	public List<ColumnInfo> getDisplayCols() {
		return displayCols;
	}

	/**
	 * @param displayCols the displayCols to set
	 */
	public void setDisplayCols(List<ColumnInfo> displayCols) {
		this.displayCols = displayCols;
	}

	/**
	 * 首字母大写
	 * 
	 * @author hans
	 * @createDate 2017年6月16日
	 * @param str
	 * @return
	 */
	public String firstUpper(String str) {
		return str.substring(0, 1).toUpperCase() + str.substring(1, str.length() - 1).toLowerCase();
	}
}
